package com.ulic.customerManApplication.documentmodule.bo;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import com.ulic.customerManApplication.usermodule.bo.User;
@Entity
@Table(name="T_GYW_DOCUMENT")
@SequenceGenerator(name="document_seq",sequenceName="S_GYW_DOCUMENT_ID")
public class Document implements Serializable{

	/**
	 * 文档信息
	 */
	private static final long serialVersionUID = 1L;
	private int id;//编号
	private String title;//标题
	private String fileDesc;//文档描述
	private String document;//文档
	private User uploadPerson;//上传人
	private String uploadDate;//上传时间
	@Id
	@GeneratedValue(strategy=GenerationType.SEQUENCE,generator="document_seq")
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getFileDesc() {
		return fileDesc;
	}
	public void setFileDesc(String fileDesc) {
		this.fileDesc = fileDesc;
	}
	public String getDocument() {
		return document;
	}
	public void setDocument(String document) {
		this.document = document;
	}
	public void setUploadPerson(User uploadPerson) {
		this.uploadPerson = uploadPerson;
	}
	@ManyToOne(cascade = CascadeType.REFRESH, fetch = FetchType.LAZY, optional = false)   
    @JoinColumn(name="UM_USER_ID")
	public User getUploadPerson() {
		return uploadPerson;
	}
	public String getUploadDate() {
		return uploadDate;
	}
	public void setUploadDate(String uploadDate) {
		this.uploadDate = uploadDate;
	}
	 
}
